/**
 * BrandBigData.com Inc.
 * Copyright (c) 2017 All Rights Reserved.
 */
package com.qibao.toolkit.util;

/**
 * @author Tim_Yu
 * @version $Id: NumberUtils.java, v0.1 2017/6/14 14:33 Tim_Yu
 */
public class NumberUtils {
    /**
     * determine whether a string is an positive integer or not
     *
     * @param str
     * @return
     */
    public static boolean validatePositiveInteger(String str) {
        try {
            int number = Integer.parseInt(str);
            if (number <= 0) {
                return false;
            }
        } catch (Exception e) {
            return false;
        }
        return true;
    }

}
